/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-08-19 18:04:40
 * @LastEditors: GGB
 * @LastEditTime: 2021-08-19 18:08:05
 */
import 'package:flutter/material.dart';
import 'package:flutter_data_center/controller/alert_controller.dart';
import 'package:flutter_data_center/utills/color_utils.dart';
import 'package:get/get.dart';

import 'count_item.dart';

class CountGroup extends StatelessWidget {
  const CountGroup({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) => GetBuilder<AlertController>(
        builder: (_controller) => Expanded(
          child: Row(
            children: [
              Flexible(
                child: Countitem(
                  label: "监控",
                  dotColor: gColor("#FFD706"),
                  count: _controller.camera,
                ),
              ),
              Flexible(
                child: Countitem(
                  label: "故障",
                  dotColor: gColor("#FFD706"),
                  count: _controller.error,
                ),
              ),
              Flexible(
                child: Countitem(
                  label: "网络",
                  dotColor: gColor("#FFD706"),
                  count: _controller.network,
                ),
              ),
            ],
          ),
        ),
      );
}
